package com.itheima.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/login")

    public String login(String username, String password, Model model){
        if("admin".equals(username)&&"123".equals(password)){
            model.addAttribute("username",username);
            return "/sucess.jsp";
        }
        return "/error.jsp";
    }
}
